from django.contrib import admin
from doctors.models import LabelModel, DoctorModel, AnswerModel, PrescriptionModel, EvaluateModel


class LabelModelAdmin(admin.ModelAdmin):
    list_display = ['id', 'name']
    ordering = ['id']
    search_fields = ['name']


admin.site.register(LabelModel, LabelModelAdmin)


class DoctorModelAdmin(admin.ModelAdmin):
    list_display = ['id', 'name', 'title', 'hospital', 'department', 'avatar_small', 'price']
    ordering = ['id']
    search_fields = ['name']


admin.site.register(DoctorModel, DoctorModelAdmin)


class AnswerModelAdmin(admin.ModelAdmin):
    list_display = ['id', 'user', 'doctor', 'create_time', 'update_time', 'patients']
    ordering = ['id']
    search_fields = ['user']


admin.site.register(AnswerModel, AnswerModelAdmin)


class PrescriptionModelAdmin(admin.ModelAdmin):
    list_display = ['id', 'user', 'doctor', 'content', 'create_time']
    ordering = ['id']
    search_fields = ['user']


admin.site.register(PrescriptionModel, PrescriptionModelAdmin)


class EvaluateModelAdmin(admin.ModelAdmin):
    list_display = ['id', 'user', 'doctor', 'star', 'content', 'create_time']
    ordering = ['id']
    search_fields = ['user']


admin.site.register(EvaluateModel, EvaluateModelAdmin)
